﻿<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>

<fmt:setBundle basename="ApplicationMessage" />

<!DOCTYPE html>
<html lang="zh-CN">
<head>

  <%@ include file="/WEB-INF/include/meta.jsp"%>
  <%@ include file="/WEB-INF/include/css.jsp"%>

</head>

<body class="ihg-theme-draft">

  <%@ include file="/WEB-INF/include/header.jsp"%>
  <jsp:include page="/WEB-INF/include/submenu-session.jsp">
    <jsp:param name="currentUrl" value="${ctx.host}/sessions/${session.id}" />
  </jsp:include>

  <div class="container-fluid ihg-container has-ihg-sidemenu">

    <div class="ihg-breadcrumb">
      <ol class="breadcrumb border-breadcrumb">
        <li class="active">Session Before Preparation</li>
      </ol>
      <div class="pull-right">
        <a href="${ctx.host}/active-sessions" style="color: #155CB2;"><<&nbsp;Go Back List</a>
      </div>
    </div>

    <div class="ihg-content-layout has-operation">
      <div class="row">
        <div class="col-xs-12">
          <ul class="nav nav-tabs" role="tablist" style="margin-top: 20px;">
            <li role="preparation" class="active"><a href="${ctx.host}/sessions/${session.id}/certificate" role="tab">Certificate</a></li>
            <li role="preparation"><a href="${ctx.host}/sessions/${session.id}/assessor-qa-call" role="tab">Assessor Q&A Call</a></li>
          </ul>
          
          <div class="tab-content" style="margin-top: 25px;">

            <div class="col-xs-12 form-horizontal ihg-form" style="padding: 0px;">
              <div class="ihg-form-title clearfix">
                <h5>End Date: <fmt:formatDate dateStyle="MEDIUM" type="DATE" value="${session.endDate}"/></h5>
              </div>
              
              <table class="table table-striped ihg-table tab-pane">
                <thead>
                  <tr>
                    <th>ASSESSOR NAME</th>
                    <th>EMAIL ADDRESS</th>
                    <th>TELEPHONE</th>
                    <th>FINISHED NUMBER</th>
                    <th>STATUS</th>
                  </tr>
                </thead>
                <tbody>
                  <c:forEach var="assessor" items="${assessors}">
                    <tr>
                      <td>${assessor.name}</td>
                      <td>${assessor.email}</td>
                      <td>${assessor.telephone}</td>
                      <td>${tasks[assessor.id]}&nbsp;/&nbsp;4</td>
                      <td><label class="label label-${sessionTasks[assessor.idString].status.finish ? 'success' : 'default'}">${sessionTasks[assessor.idString].status.finish ? 'FINISH' : 'NOT START'}</label></td>
                    </tr>
                  </c:forEach>
                </tbody>
              </table>
            </div>
          
          </div>
        </div>
        
      </div>
    </div>

  </div>

  <%@ include file="/WEB-INF/include/footer.jsp"%>
  <%@ include file="/WEB-INF/include/script.jsp"%>
  <d:resource root="${ctx.resource}/build" type="script" src="js/page/session/before/preparation/certificate-view.js" />
  <script type="text/javascript">
    require([ 'page/session/before/preparation/certificate-view' ], function(page) {
      page.init();
    })
  </script>

</body>
</html>